\(\int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx\) [376]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 21, antiderivative size = 93 \[ \int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx=\frac {3 \sqrt {b} \arctan \left (\frac {\sqrt {b \sec (e+f x)}}{\sqrt {b}}\right )}{4 f}-\frac {3 \sqrt {b} \text {arctanh}\left (\frac {\sqrt {b \sec (e+f x)}}{\sqrt {b}}\right )}{4 f}-\frac {\cot ^2(e+f x) (b \sec (e+f x))^{3/2}}{2 b f} \]

[Out]

-1/2*cot(f*x+e)^2*(b*sec(f*x+e))^(3/2)/b/f+3/4*arctan((b*sec(f*x+e))^(1/2)/b^(1/2))*b^(1/2)/f-3/4*arctanh((b*s
ec(f*x+e))^(1/2)/b^(1/2))*b^(1/2)/f

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2702, 294, 335, 304, 209, 212} \[ \int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx=\frac {3 \sqrt {b} \arctan \left (\frac {\sqrt {b \sec (e+f x)}}{\sqrt {b}}\right )}{4 f}-\frac {3 \sqrt {b} \text {arctanh}\left (\frac {\sqrt {b \sec (e+f x)}}{\sqrt {b}}\right )}{4 f}-\frac {\cot ^2(e+f x) (b \sec (e+f x))^{3/2}}{2 b f} \]

[In]

Int[Csc[e + f*x]^3*Sqrt[b*Sec[e + f*x]],x]

[Out]

(3*Sqrt[b]*ArcTan[Sqrt[b*Sec[e + f*x]]/Sqrt[b]])/(4*f) - (3*Sqrt[b]*ArcTanh[Sqrt[b*Sec[e + f*x]]/Sqrt[b]])/(4*
f) - (Cot[e + f*x]^2*(b*Sec[e + f*x])^(3/2))/(2*b*f)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 304

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}
, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !
GtQ[a/b, 0]

Rule 335

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + b*(x^(k*n)/c^n))^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^{5/2}}{\left (-1+\frac {x^2}{b^2}\right )^2} \, dx,x,b \sec (e+f x)\right )}{b^3 f} \\ & = -\frac {\cot ^2(e+f x) (b \sec (e+f x))^{3/2}}{2 b f}+\frac {3 \text {Subst}\left (\int \frac {\sqrt {x}}{-1+\frac {x^2}{b^2}} \, dx,x,b \sec (e+f x)\right )}{4 b f} \\ & = -\frac {\cot ^2(e+f x) (b \sec (e+f x))^{3/2}}{2 b f}+\frac {3 \text {Subst}\left (\int \frac {x^2}{-1+\frac {x^4}{b^2}} \, dx,x,\sqrt {b \sec (e+f x)}\right )}{2 b f} \\ & = -\frac {\cot ^2(e+f x) (b \sec (e+f x))^{3/2}}{2 b f}-\frac {(3 b) \text {Subst}\left (\int \frac {1}{b-x^2} \, dx,x,\sqrt {b \sec (e+f x)}\right )}{4 f}+\frac {(3 b) \text {Subst}\left (\int \frac {1}{b+x^2} \, dx,x,\sqrt {b \sec (e+f x)}\right )}{4 f} \\ & = \frac {3 \sqrt {b} \arctan \left (\frac {\sqrt {b \sec (e+f x)}}{\sqrt {b}}\right )}{4 f}-\frac {3 \sqrt {b} \text {arctanh}\left (\frac {\sqrt {b \sec (e+f x)}}{\sqrt {b}}\right )}{4 f}-\frac {\cot ^2(e+f x) (b \sec (e+f x))^{3/2}}{2 b f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.58 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.02 \[ \int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx=-\frac {\left (-6 \arctan \left (\sqrt {\sec (e+f x)}\right )-3 \log \left (1-\sqrt {\sec (e+f x)}\right )+3 \log \left (1+\sqrt {\sec (e+f x)}\right )+\frac {4 \csc ^2(e+f x)}{\sqrt {\sec (e+f x)}}\right ) \sqrt {b \sec (e+f x)}}{8 f \sqrt {\sec (e+f x)}} \]

[In]

Integrate[Csc[e + f*x]^3*Sqrt[b*Sec[e + f*x]],x]

[Out]

-1/8*((-6*ArcTan[Sqrt[Sec[e + f*x]]] - 3*Log[1 - Sqrt[Sec[e + f*x]]] + 3*Log[1 + Sqrt[Sec[e + f*x]]] + (4*Csc[
e + f*x]^2)/Sqrt[Sec[e + f*x]])*Sqrt[b*Sec[e + f*x]])/(f*Sqrt[Sec[e + f*x]])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(460\) vs. \(2(73)=146\).

Time = 0.30 (sec) , antiderivative size = 461, normalized size of antiderivative = 4.96

method result size
default \(-\frac {\sqrt {-\frac {b \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1\right )}{\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-1}}\, \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-1\right ) \left (-\left (1-\cos \left (f x +e \right )\right )^{4} \sqrt {\left (1-\cos \left (f x +e \right )\right )^{4} \left (\csc ^{4}\left (f x +e \right )\right )-1}\, \left (\csc ^{4}\left (f x +e \right )\right )+\left (\left (1-\cos \left (f x +e \right )\right )^{4} \left (\csc ^{4}\left (f x +e \right )\right )-1\right )^{\frac {3}{2}}-\left (1-\cos \left (f x +e \right )\right )^{2} \sqrt {\left (1-\cos \left (f x +e \right )\right )^{4} \left (\csc ^{4}\left (f x +e \right )\right )-1}\, \left (\csc ^{2}\left (f x +e \right )\right )+\ln \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{4} \left (\csc ^{4}\left (f x +e \right )\right )-1}\right ) \left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+3 \arctan \left (\frac {1}{\sqrt {\left (1-\cos \left (f x +e \right )\right )^{4} \left (\csc ^{4}\left (f x +e \right )\right )-1}}\right ) \left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-4 \ln \left (2 \left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+2 \sqrt {\left (1-\cos \left (f x +e \right )\right )^{4} \left (\csc ^{4}\left (f x +e \right )\right )-1}\right ) \left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )\right ) \left (\sin ^{2}\left (f x +e \right )\right )}{8 f \sqrt {\left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1\right ) \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-1\right )}\, \left (1-\cos \left (f x +e \right )\right )^{2}}\) \(461\)

[In]

int(csc(f*x+e)^3*(b*sec(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/8/f*(-b*((1-cos(f*x+e))^2*csc(f*x+e)^2+1)/((1-cos(f*x+e))^2*csc(f*x+e)^2-1))^(1/2)*((1-cos(f*x+e))^2*csc(f*
x+e)^2-1)*(-(1-cos(f*x+e))^4*((1-cos(f*x+e))^4*csc(f*x+e)^4-1)^(1/2)*csc(f*x+e)^4+((1-cos(f*x+e))^4*csc(f*x+e)
^4-1)^(3/2)-(1-cos(f*x+e))^2*((1-cos(f*x+e))^4*csc(f*x+e)^4-1)^(1/2)*csc(f*x+e)^2+ln((1-cos(f*x+e))^2*csc(f*x+
e)^2+((1-cos(f*x+e))^4*csc(f*x+e)^4-1)^(1/2))*(1-cos(f*x+e))^2*csc(f*x+e)^2+3*arctan(1/((1-cos(f*x+e))^4*csc(f
*x+e)^4-1)^(1/2))*(1-cos(f*x+e))^2*csc(f*x+e)^2-4*ln(2*(1-cos(f*x+e))^2*csc(f*x+e)^2+2*((1-cos(f*x+e))^4*csc(f
*x+e)^4-1)^(1/2))*(1-cos(f*x+e))^2*csc(f*x+e)^2)/(((1-cos(f*x+e))^2*csc(f*x+e)^2+1)*((1-cos(f*x+e))^2*csc(f*x+
e)^2-1))^(1/2)/(1-cos(f*x+e))^2*sin(f*x+e)^2

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 170 vs. \(2 (73) = 146\).

Time = 0.32 (sec) , antiderivative size = 354, normalized size of antiderivative = 3.81 \[ \int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx=\left [\frac {6 \, {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sqrt {-b} \arctan \left (\frac {\sqrt {-b} \sqrt {\frac {b}{\cos \left (f x + e\right )}} {\left (\cos \left (f x + e\right ) + 1\right )}}{2 \, b}\right ) + 3 \, {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sqrt {-b} \log \left (\frac {b \cos \left (f x + e\right )^{2} - 4 \, {\left (\cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt {-b} \sqrt {\frac {b}{\cos \left (f x + e\right )}} - 6 \, b \cos \left (f x + e\right ) + b}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) + 8 \, \sqrt {\frac {b}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{16 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )}}, -\frac {6 \, {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sqrt {b} \arctan \left (\frac {\sqrt {\frac {b}{\cos \left (f x + e\right )}} {\left (\cos \left (f x + e\right ) - 1\right )}}{2 \, \sqrt {b}}\right ) - 3 \, {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sqrt {b} \log \left (\frac {b \cos \left (f x + e\right )^{2} - 4 \, {\left (\cos \left (f x + e\right )^{2} + \cos \left (f x + e\right )\right )} \sqrt {b} \sqrt {\frac {b}{\cos \left (f x + e\right )}} + 6 \, b \cos \left (f x + e\right ) + b}{\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) + 1}\right ) - 8 \, \sqrt {\frac {b}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{16 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )}}\right ] \]

[In]

integrate(csc(f*x+e)^3*(b*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/16*(6*(cos(f*x + e)^2 - 1)*sqrt(-b)*arctan(1/2*sqrt(-b)*sqrt(b/cos(f*x + e))*(cos(f*x + e) + 1)/b) + 3*(cos
(f*x + e)^2 - 1)*sqrt(-b)*log((b*cos(f*x + e)^2 - 4*(cos(f*x + e)^2 - cos(f*x + e))*sqrt(-b)*sqrt(b/cos(f*x +
e)) - 6*b*cos(f*x + e) + b)/(cos(f*x + e)^2 + 2*cos(f*x + e) + 1)) + 8*sqrt(b/cos(f*x + e))*cos(f*x + e))/(f*c
os(f*x + e)^2 - f), -1/16*(6*(cos(f*x + e)^2 - 1)*sqrt(b)*arctan(1/2*sqrt(b/cos(f*x + e))*(cos(f*x + e) - 1)/s
qrt(b)) - 3*(cos(f*x + e)^2 - 1)*sqrt(b)*log((b*cos(f*x + e)^2 - 4*(cos(f*x + e)^2 + cos(f*x + e))*sqrt(b)*sqr
t(b/cos(f*x + e)) + 6*b*cos(f*x + e) + b)/(cos(f*x + e)^2 - 2*cos(f*x + e) + 1)) - 8*sqrt(b/cos(f*x + e))*cos(
f*x + e))/(f*cos(f*x + e)^2 - f)]

Sympy [F]

\[ \int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx=\int \sqrt {b \sec {\left (e + f x \right )}} \csc ^{3}{\left (e + f x \right )}\, dx \]

[In]

integrate(csc(f*x+e)**3*(b*sec(f*x+e))**(1/2),x)

[Out]

Integral(sqrt(b*sec(e + f*x))*csc(e + f*x)**3, x)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.14 \[ \int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx=\frac {b {\left (\frac {4 \, \left (\frac {b}{\cos \left (f x + e\right )}\right )^{\frac {3}{2}}}{b^{2} - \frac {b^{2}}{\cos \left (f x + e\right )^{2}}} + \frac {6 \, \arctan \left (\frac {\sqrt {\frac {b}{\cos \left (f x + e\right )}}}{\sqrt {b}}\right )}{\sqrt {b}} + \frac {3 \, \log \left (-\frac {\sqrt {b} - \sqrt {\frac {b}{\cos \left (f x + e\right )}}}{\sqrt {b} + \sqrt {\frac {b}{\cos \left (f x + e\right )}}}\right )}{\sqrt {b}}\right )}}{8 \, f} \]

[In]

integrate(csc(f*x+e)^3*(b*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

1/8*b*(4*(b/cos(f*x + e))^(3/2)/(b^2 - b^2/cos(f*x + e)^2) + 6*arctan(sqrt(b/cos(f*x + e))/sqrt(b))/sqrt(b) +
3*log(-(sqrt(b) - sqrt(b/cos(f*x + e)))/(sqrt(b) + sqrt(b/cos(f*x + e))))/sqrt(b))/f

Giac [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.05 \[ \int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx=\frac {b^{4} {\left (\frac {2 \, \sqrt {b \cos \left (f x + e\right )}}{{\left (b^{2} \cos \left (f x + e\right )^{2} - b^{2}\right )} b^{2}} + \frac {3 \, \arctan \left (\frac {\sqrt {b \cos \left (f x + e\right )}}{\sqrt {-b}}\right )}{\sqrt {-b} b^{3}} - \frac {3 \, \arctan \left (\frac {\sqrt {b \cos \left (f x + e\right )}}{\sqrt {b}}\right )}{b^{\frac {7}{2}}}\right )} \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{4 \, f} \]

[In]

integrate(csc(f*x+e)^3*(b*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

1/4*b^4*(2*sqrt(b*cos(f*x + e))/((b^2*cos(f*x + e)^2 - b^2)*b^2) + 3*arctan(sqrt(b*cos(f*x + e))/sqrt(-b))/(sq
rt(-b)*b^3) - 3*arctan(sqrt(b*cos(f*x + e))/sqrt(b))/b^(7/2))*sgn(cos(f*x + e))/f

Mupad [F(-1)]

Timed out. \[ \int \csc ^3(e+f x) \sqrt {b \sec (e+f x)} \, dx=\int \frac {\sqrt {\frac {b}{\cos \left (e+f\,x\right )}}}{{\sin \left (e+f\,x\right )}^3} \,d x \]

[In]

int((b/cos(e + f*x))^(1/2)/sin(e + f*x)^3,x)

[Out]

int((b/cos(e + f*x))^(1/2)/sin(e + f*x)^3, x)